Aligning Slices Automatically
A number of matching processes, including Feature Based, Mutual Information, SSD (sum of squared differences), and Template Matching, are available for aligning slices automatically (see Registration and Compensation Methods). You should note that methods to quantify the degree of similarity between images, and apply the required linear transformations to register 2D slices within the 3D image stack, are based on different concepts and that results may differ significantly. The performance of each algorithm is also dependent on the input data and the settings selected for registration. You may find that selecting an appropriate matching process for you data is often best done by trial and error.
Although it is not possible to recommend which matching method will provide the best results for your data or what slice alignment workflow should be used, you should consider the following before you attempt to align slices automatically:
- Template Matching is generally the fastest method, but requires good matches between slices and cannot correct rotations (see Template Matching Settings).
- The Feature Based method can provide a good initial alignment and can work well within selected ranges (see Feature Base Settings).
- Initial alignments done with Template Matching or the Feature Based method can be followed with a subsequent matching method, such as Enhanced Correlation Coefficient, to refine the results.
Transformations can be implemented by either one of two mechanisms — at the input so that the original image data is transformed, or at the output so that a new dataset is created and the original image remains unmodified.
Optimizing Slice Alignments
A number of pre-processing steps may be required to optimize automatic slice alignments. However, you should note that it is often not possible to know in advance which of these pre-processing steps will produce the best results. In addition, you should note that some matching methods can provide a good initial alignment, while others are best for refining an alignment (see Registration and Compensation Methods).
- Input images are often pre-processed to normalize contrast and brightness effects, as well as to correct shading issues (see Image Filters and Settings).
- It is sometimes necessary to remove or interpolate unrepresentative image slices (see Marking Slices and Modifying Image Stacks).
- If images in the stack require large translations and/or rotations to correct alignment, an initial manual transformation that roughly aligns the images may be necessary so that the images in the stack show approximately the same image content (see Aligning Slices Manually).
How to Align Slices Automatically
- Right-click the required dataset in the Data Properties and Settings panel and then choose Slice Registration in the pop-up menu.
The Slices Registration window appears (see Slice Registration Window). Registration options and controls are available in the panel on the left side, while images of the dataset are arranged in the workspace.
- Scroll through the image slices and familiarize yourself with the corrections that need to be made to the image stack, recommended.
Some datasets may only need translation corrections, while others may need more extensive transformations. You should also note if it would be best to process selected ranges rather than the whole stack.
- Choose a registration method — Enhanced Correlation Coefficient, Feature Based, Mutual Info, Optical Flow, SSD or Template Matching — in the Registration method drop-down list (see Registration and Compensation Methods for information about the available matching processes).
- Choose the settings for the selected registration method (see Registration Method Settings).
- Check the Use selection box option, if required, and a selection box type — Fixed or Follow template (see Registration Options).
When selected, calculations for the required transformations will be constrained to the 2D region defined by the selection box (X and Y axes only).
- Do the following if you selected Fixed as the Use selection box option:
- Do the following if you selected Follow template as the Use selection box option:
- Adjust the selection box so that it only includes a representative sample of features common through the image stack. If required, you can select the slice range that includes the identified features. In this case, you should set the template on the first slice in the selected range.
To adjust the selection box, simply drag the edges of the selection box. You can also translate the box by dragging from the center.
- Select a matching method in the drop-down menu (see Registration Options).

- Click the Preview Template Matching button to view and evaluate the matching result.
If required, you can select another matching method and then preview and evaluate the results.
- Check the Use slice range option, if required. If selected, the calculations performed for transforming the dataset will be limited to the selected slice range (see Registration Options).
Do one of the following to select a slice range:
- Enter the minimum and maximum slice numbers in the Min and Max edit boxes.
- Scroll to the required image slice and then click the Set button to set the Min or Max slice number.
- Click the Apply button to automatically align the slices in the dataset.
- Evaluate the results by scrolling through the registered dataset and by examining the lateral views.
- When you scroll through the dataset in the main view, pay attention to the features that should be aligned within the dataset. There should no observable positional or rotational jumps as you scroll through the dataset.
- When you examine the lateral views, features should be aligned vertically, even though the image stack is not.
-
If required, you can continue the current registration by modifying the selected parameters or by changing the registration method.
You can also click the Undo button to undo the current registration or you can roll-back to any other point in the process by changing the current registration applied.
- Do the following to apply linear displacement compensation, if required.
- Choose Linear Displacement Compensation in the Registration method drop-down menu (see Registration and Compensation Methods or information about this compensation method),
- Adjust the compensation factor with the Compensation Factor slider in the Settings box, if required.
- Click the Apply button to apply the selected compensation.
- Save the transformation template, optional (see Saving and Loading Transformation Templates).
- Do one or more of the following to define the Output options:
- Select Transform current dataset, if you want the registration to be applied directly to the original image data, or Create new dataset, if want to create a new dataset as the output of the registration process.
- Select the Crop data to option, if required.
You can crop the output to either the selection box used for the registration or to an adjustable used-defined box. These options are available in the drop-down menu.
- Select other datasets to which you want to apply the current registration to in the drop-down menu shown below, optional.

Note Only equivalent datasets that have the same number of slices in the image stack will be shown in the drop-down menu.
- Click the OK button to complete the transformation process.
See Exporting Objects for information about saving modified or new datasets.